﻿namespace Xms.Abp.Data;

public class PagedSortedAndFilterParameter : IPagedSortedAndFilterParameter
{
    public static int DefaultMaxResultCount { get; set; } = 10;

    public static int MaxMaxResultCount { get; set; } = 1000;

    public virtual int PageIndex { get => SkipCount / MaxResultCount + 1; set => SkipCount = (value - 1) * MaxResultCount; }
    public virtual int PageSize { get => MaxResultCount; set => MaxResultCount = value; }

    public virtual int SkipCount { get; set; } = 0;

    public virtual int MaxResultCount { get; set; } = 15;

    public virtual string Filter { get; set; }
}
